/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.ericsson.nfc.signing.certificate;

import com.ericsson.nfc.signing.record.CertificateBytes;
import com.ericsson.nfc.signing.record.CertificateField;
import java.io.IOException;

//#ifdef MyJSR257
//# import my.javax.microedition.contactless.ndef.NDEFRecordType;
//#else
import javax.microedition.contactless.ndef.NDEFRecordType;
//#endif

/**
 *
 * @author emarkki
 */
public class DefaultCertificateChainFactory extends CertificateChainFactory {

    public CertificateChain createInstance(NDEFRecordType signatureRecordType, int certificateFormat, CertificateBytes[] chainBytes) throws IOException {
        
        CertificateChain chain = null;
        
        switch(certificateFormat) {
            case CertificateField.X509: {
                chain = new X509CertificateChain(chainBytes);
                break;
            }
        }
        
        return chain;
    }

    
}
